package main

import (
	_ "beego/models"
	_ "beego/routers"
	"github.com/astaxie/beego"
	_ "github.com/astaxie/beego/session/redis"
	"github.com/beego/beego/v2/core/logs"
	"time"
)

func main() {
	date := time.Now().Format("2006-01-02")
	err := logs.SetLogger(logs.AdapterFile, `{"filename":"logs/`+date+`.log","level":7,"maxlines":0,"maxsize":1001024,"daily":true,"maxdays":10,"color":true}`)
	if err != nil {
		panic(err)
	}
	beego.Run()
}
